<template>
    <div class="page">
        <headerTitle></headerTitle>
        <div class="myBox">
            <div class="vipHeader">
                <span class="tx iconfont icon-expressman"></span>
                <span>{{username}}</span>
                <span>{{vipType}}</span>
                <span>到期时间:{{zctime}} </span>
    
            </div>
            <ul class="functionList">
                <li>
                    <router-link to="/vipHome">
                        <span class="iconfont icon-home_light"></span>
                        <p>首页</p>
                    </router-link>
                </li>
                <li>
                    <router-link to="/jc">
                        <span class="iconfont icon-read"></span>
                        <p>教程</p>
                    </router-link>
                </li>
                <li>
                    <router-link to="/cz">
                        <span class="iconfont icon-shoplight"></span>
                        <p>充值</p>
                    </router-link>
                </li>
            </ul>
            <div class="tc">
                <a @click.stop="gotoOut">退出登录</a>
            </div>
        </div>
        <bottomBtn></bottomBtn>
    </div>
</template>

<script type="text/ecmascript-6">
import router from '../router/index'
    import bottomBtn from "../Modular/bottomBtn";
    import headerTitle from "../Modular/headerTitle";
    export default {
        data() {
            return {
                username: window.localStorage.Uname,
                zctime: window.localStorage.startTime,
                vipType: ''
            };
        },
        components: {
            bottomBtn,
            headerTitle
        },
        mounted() {
            let vipt = window.localStorage.status;
            let that = this
            if (vipt == '1') {
                that.vipType = "试用会员"
            } else if (vipt == '2') {
                that.vipType = "正式会员"
            } else if (vipt == '3') {
                that.vipType = "禁用"
            }
        },
        methods: {
            gotoOut:function(){
                window.localStorage.removeItem('Uname');
                 window.localStorage.removeItem('startTime');
                 window.localStorage.removeItem('status');
router.push({path:'/'})
            }
        }
    };
</script>

<style scoped>
    
</style>
